home *** CD-ROM | disk | FTP | other *** search
-
- *************************************
- FlushLib version 1.0
- Copyright ©1993 by Roy van der Woning
- All rights reserved.
- *************************************
-
-
- 1. What is FlushLib?
-
- FlushLib is a small utility which I put together because I needed it
- myself. Basically, all it does is flush a shared library (like
- asl.library, diskfont.library, etc) from memory. This is done by calling
- the exec.library function RemLibrary() for the library to be flushed.
- RemLibrary() in turn branches into the expunge vector of that library which
- initiates its removal from memory.
-
- ///////////////////////////////////////////////////////
- // FLUSHLIB ONLY WORKS WITH OS VERSIONS 37 OR HIGHER //
- ///////////////////////////////////////////////////////
-
-
- 2. Why would I want to use FlushLib?
-
- The normal everyday user wouldn't find FlushLib a very useful tool but
- software developers might want to take a second look at it. It is very
- useful if you are developing shared libraries. If your shared library is
- accessed for the first time it is loaded from the LIBS: directory and then
- remains in memory until someone tells it to get lost. This usually only
- happens when you end up in a low memory situation. Otherwise, no matter
- how many times you modify your library sourcecode and recompile or
- reassemble it, the system keeps referring to the version in memory. Thus,
- if you want to test your modified version, you would have to get rid of the
- version in memory first. Wasn't that what FlushLib did? :)
-
-
- 3. How do I use FlushLib?
-
- The usage is as simple as can be. Call FlushLib with the name of the
- library you want to be flushed and the rest is out of your hands. :) There
- is one switch that can go along with the libraryname: FORCE. This switch
- flushes the library even if it is still in use by one or more applications.
- Since this is not standard procedure and potentially dangerous (your
- machine can crash) you should use this switch with extreme care and only if
- you know what you are doing.
-
- An example use for the switch would be a case where an application crashes
- before it gets a chance to close the libraries it opened. Normally, if you
- requested this library to be flushed, Exec would turn down your request,
- thinking that the library is still in use by the crashed application. This
- is true but crashed applications normally don't make use of a library
- anymore. :) So you would want to flush the library forcibly by using the
- FORCE keyword.
-
-
- 4. Is it dangerous to fool around with FlushLib?
-
- FlushLib performs a number of sanity checks to make sure that everything
- happens the way it should. First it checks if the library you want to
- flush can be found in the Exec librarylist. If so, the OpenCnt value of
- that library is examined. This value indicates the number of applications
- that have opened the library but have not closed it (yet). If this value
- is not zero, someone is still using the library and it cannot be flushed.
- Otherwise, an attempt is made to flush the library. After this attempt, a
- renewed lookup is performed to make sure that the library was actually
- removed from the Exec library list. After all, the library could indicate
- that it doesn't want to be flushed at all (by means of an "empty" expunge
- vector). Diagnostic messages keep you informed about all possible
- outcomes.
-
-
- 5. Can I use and distribute FlushLib?
-
- Yes you can, even free of charge. :) FlushLib is FreeWare and the original
- archive may be copied, uploaded to Bulletin Board Systems, hatched in file
- distribution networks, etc. You may not do this with modified versions of
- the archive, either with files added or removed, nor may any of the files
- be enhanced, updated or otherwise modified.
-
-
- 6. What if it doesn't work?
-
- I would appreciate bugreports on FlushLib to be sent to me through Fido
- netmail at 2:283/705.7. If you have bugreports or remarks for any of my
- other projects, please note that my FidoNet address has changed. You
- should use the new address for any and all correspondence with me. Happy
- developing!
-
-